<center><button class="btn btn-primary" name="addNewUser" style="margin-top:10px;margin-bottom:10px;">创建一个新用户</button></center>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="table table-bordered table-hover table-striped">
  <tr>
    <td width="8%" height="35" align="center" valign="middle">序号</td>
    <td width="24%" align="center" valign="middle">ID</td>
    <td width="17%" align="center" valign="middle">姓名</td>
    <td width="17%" align="center" valign="middle">注册时间</td>
    <td width="17%" align="center" valign="middle">编辑</td>
    <td width="17%" align="center" valign="middle">删除</td>
  </tr>
  <volist name="all" id="vo">
  <tr style="height:28px;">
    <td height="28" align="center" valign="middle"><{$vo.index}></td>
    <td align="center" valign="middle"><{$vo.tid}></td>
    <td align="center" valign="middle"><{$vo.name}></td>
    <td align="center" valign="middle"><{$vo.date}></td>
    <td align="center" valign="middle"><a name="editorDetail" title="<{$vo.id}>">编辑</a></td>
    <td align="center" valign="middle"><a name="deletes" title="<{$vo.id}>">删除</a></td>
  </tr>
  </volist>
</table>
<div id="bys_model_window">
    <iframe id="bys_model_content" src="" frameborder="0" scrolling="no"></iframe>
    <button id="bys_model_close">×</button>
</div>
<script>
    var bys_model_content=document.getElementById("bys_model_content");
    var editorDetail=document.getElementsByName("editorDetail");
    var deletes=document.getElementsByName("deletes");
    var addNewUser=document.getElementsByName("addNewUser")[0];
    var close=document.getElementById("bys_model_close");
    var x;
    for(x=0;x<editorDetail.length;x++){
        editorDetail[x].onclick=function(){
            var inid=this.title;
            var tmp="<{:U('System/userEditor')}>".split(".");
            var src=new Array();
            src[0]=tmp[0]+"."+tmp[1];
            src[1]=tmp[2];
            bys_model_content.src=src[0]+"/id/"+inid+"/type/editor"+"."+src[1];
            var bwidth=document.body.offsetWidth;
            var wwidth=450;
            bys_model_window.style.left=((bwidth/2)-(wwidth/2))+"px";
            bys_model_window.style.display="block";
        }
    }
    for(x=0;x<deletes.length;x++){
        deletes[x].onclick=function(){
            var inid=this.title;
            var tmp="<{:U('System/userEditor')}>".split(".");
            var src=new Array();
            src[0]=tmp[0]+"."+tmp[1];
            src[1]=tmp[2];
            bys_model_content.src=src[0]+"/id/"+inid+"/type/delete"+"."+src[1];
            var bwidth=document.body.offsetWidth;
            var wwidth=450;
            bys_model_window.style.left=((bwidth/2)-(wwidth/2))+"px";
            bys_model_window.style.display="block";
        }
    }
    close.onclick=function(){
        bys_model_window.style.display="none";
    }
    addNewUser.onclick=function(){
            var tmp="<{:U('System/userEditor')}>".split(".");
            var src=new Array();
            src[0]=tmp[0]+"."+tmp[1];
            src[1]=tmp[2];
            bys_model_content.src=src[0]+"/type/new"+"."+src[1];
            var bwidth=document.body.offsetWidth;
            var wwidth=450;
            bys_model_window.style.left=((bwidth/2)-(wwidth/2))+"px";
            bys_model_window.style.display="block";
    }
</script>
